Fix bogus CDATA encoding of description in KML tags.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 28 Jun 2010 21:25:49 +0000 (21:25 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 28 Jun 2010 21:25:49 +0000 (21:25 +0000)
gpsbabel/kml.c

index 8e41317b489e1525ef08f62e177540f83f20b558..1ce8ff5140be2306d5b4365e3bb60f69bc3dfdb7 100644 (file)
@@ -413,9 +413,9 @@ kml_write_xmle(const char *tag, const char *fmt, ...)
                if (strspn(tmp_ent, "&'<>\""))
                        needs_escaping = 1;
                gbfprintf(ofd, "<%s>", tag);
-                if (needs_escaping) gbfprintf(ofd, "<![CDATA]");
+                if (needs_escaping) gbfprintf(ofd, "<![CDATA[");
                gbvfprintf(ofd, fmt, args);
-                if (needs_escaping) gbfprintf(ofd, "]]");
+                if (needs_escaping) gbfprintf(ofd, "]]>");
                gbfprintf(ofd, "</%s>\n", tag);
                xfree(tmp_ent);
        }